section .text
	global	memset

memset:
	xor rax, rax
	mov rax, rdi
	jmp .each

.up:
	mov byte[rdi], sil
	inc rdi
	dec dl

.each:
	cmp byte[rdi], 0
	je .done
	cmp dl, 0
	jne .up

.done:
	ret